<html>

<head>
<title>SimpleDraw</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
</head>

<body>

<p align="center"><big><big><big><u><strong>SimpleDraw</strong></u></big></big></big></p>

<p><strong>SimpleDraw</strong> is sample C code illustrating the use of OpenGL. &nbsp; It
is intended to accompany the book <em><strong>3D Computer Graphics: A mathematical
approach with OpenGL</strong>, </em>by S. Buss, Cambridge University Press, 2003. &nbsp;
However, it can be used independently as well.</p>

<p><strong>SimpleDraw </strong>shows how to draw points, lines, line strips and line
loops.&nbsp;&nbsp; It consists of two source files, <strong>SimpleDraw.c</strong> and <strong>SimpleDraw.h.</strong>&nbsp;&nbsp;
There are several options available for downloading this program: 

<ul>
  <li><a href="SimpleDrawProject.zip">SimpleDrawProject.zip</a>: A zip file, including the
    source files, Microsoft Visual C++ workspace and project files, and Win32 executable.</li>
  <li><a href="SimpleDraw.zip">SimpleDraw.zip</a>: A zip file, with sources files and the
    executable.</li>
  <li><a href="SimpleDraw.c">SimpleDraw.c</a> and <a href="SimpleDraw.h">SimpleDraw.h</a> and <a
    href="SimpleDraw.exe">SimpleDraw.exe</a>:&nbsp; Download the two source files and the
    executable, one at a time.</li>
</ul>

<p><strong>Things to try out:</strong> 

<ol>
  <li>Compile and run the program.&nbsp; Use the space bar to toggle between the five images.
    &nbsp;&nbsp; Examine the source code and figure out how each of the five figures is drawn
    in the routine <strong>drawScene().</strong></li>
  <li>Uncomment out the blocks of code in <strong>initRendering()</strong> and recompile and
    re-run.&nbsp; (First uncomment the first block, then uncomment both blocks.)&nbsp; How
    does this effect what the graphics images look like on your computer?</li>
  <li>Understand the purposes of the call backs that were set up by calls to <strong>glutKeyboardFunc(),
    &nbsp; glutReshapeFunc(),&nbsp; glutDisplayFunc().</strong>&nbsp; Understand what the call
    to <strong>glutMainLoop()</strong> does.&nbsp; Understand how the program responds to the
    space bar and the escape key.</li>
  <li>This program does not use double buffering.&nbsp;&nbsp; Understand what this means.
    &nbsp; What is the purpose of the call to <strong>glutPostRedisplay()</strong> after the
    mode is changed?</li>
</ol>
<p>Version 1.1 of SimpleDraw, Sept. 28, 2003.&nbsp;&nbsp; <br>
Thanks to Rob Wilkens for a bug report.</p>
</body>
</html>